package com.heima.apis.wemedia;

import com.heima.model.admin.dtos.ChannelDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmChannel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author: CL
 * @Date: 2023-07-12   7:03
 * @Description:
 */
@FeignClient(value = "leadnews-wemedia",contextId = "x1")
public interface IWmChannelClient {

    // 删除频道
    @GetMapping("/api/v1/channel/del/{id}")
    public ResponseResult deleteChannel(@PathVariable Integer id);

    // 根据频道名称分页模糊查询
    @PostMapping("/api/v1/channel/list")
    public ResponseResult listChannels(@RequestBody ChannelDto dto);

    // 频道保存
    @PostMapping("/api/v1/channel/sava")
    public ResponseResult saveChannel(@RequestBody WmChannel wmChannel);

}
